+Mon Feb 1 16:47:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk.m4: Pass gthread on to gtk-config.
+
+ * configure.in gtk-config.in: Support gthread flag to
+ add thread cflags/libraries into the output of
+ gtk-config.
+
Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate):
+Mon Feb 1 16:47:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk.m4: Pass gthread on to gtk-config.
+
+ * configure.in gtk-config.in: Support gthread flag to
+ add thread cflags/libraries into the output of
+ gtk-config.
+
Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate):
+Mon Feb 1 16:47:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk.m4: Pass gthread on to gtk-config.
+
+ * configure.in gtk-config.in: Support gthread flag to
+ add thread cflags/libraries into the output of
+ gtk-config.
+
Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate):
+Mon Feb 1 16:47:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk.m4: Pass gthread on to gtk-config.
+
+ * configure.in gtk-config.in: Support gthread flag to
+ add thread cflags/libraries into the output of
+ gtk-config.
+
Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate):
+Mon Feb 1 16:47:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk.m4: Pass gthread on to gtk-config.
+
+ * configure.in gtk-config.in: Support gthread flag to
+ add thread cflags/libraries into the output of
+ gtk-config.
+
Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate):
+Mon Feb 1 16:47:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk.m4: Pass gthread on to gtk-config.
+
+ * configure.in gtk-config.in: Support gthread flag to
+ add thread cflags/libraries into the output of
+ gtk-config.
+
Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate):
+Mon Feb 1 16:47:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk.m4: Pass gthread on to gtk-config.
+
+ * configure.in gtk-config.in: Support gthread flag to
+ add thread cflags/libraries into the output of
+ gtk-config.
+
Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate):
# Process this file with autoconf to produce a configure script.
AC_INIT(gdk/gdktypes.h)
+# In the following, there are a the following variants
+# of GLib cflags and libs variables
+#
+# GLIB_CFLAGS: cflags for compiling libraries and example progs
+# GLIB_LIBS: libraries for linking example programs
+# GLIB_DEPLIBS: libraries for linking libraries against
+# glib_cflags: cflags to store in gtk-config
+# glib_libs: libs to store in gtk-config
+# glib_thread_cflags: cflags to store in gtk-config for gtk-config gthread
+# glib_thread_libs: libs to store in gtk-config for gtk-config gthread
+
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
# we do not want to make all gtk progs to link to thread libraries.
glib_cflags=`$GLIB_CONFIG glib gmodule --cflags`
+ glib_thread_cflags="$GLIB_CFLAGS"
glib_libs=`$GLIB_CONFIG glib gmodule --libs`
+ glib_thread_libs="$GLIB_LIBS"
GLIB_LIBS="$glib_libs"
GLIB_DEPLIBS="$glib_libs"
else
# For use in gtk-config
glib_cflags=`$GLIB_CONFIG --cflags gmodule`
+ glib_thread_cflags=`$GLIB_CONFIG --cflags gmodule gthread`
glib_libs=`$GLIB_CONFIG --libs gmodule`
+ glib_thread_libs=`$GLIB_CONFIG --libs gmodule gthread`
glib_release=`$GLIB_CONFIG --version | sed 's%\\.[[0-9]]*$%%'`
AC_SUBST(glib_cflags)
AC_SUBST(glib_libs)
+AC_SUBST(glib_thread_cflags)
+AC_SUBST(glib_thread_libs)
AC_SUBST(GLIB_DEPLIBS)
# Find the X11 include and library directories
glib_libs="@glib_libs@"
glib_cflags="@glib_cflags@"
+glib_thread_libs="@glib_thread_libs@"
+glib_thread_cflags="@glib_thread_cflags@"
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
-usage="\
-Usage: gtk-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
+usage()
+{
+ cat <<EOF
+Usage: gtk-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--version]
+ [--libs]
+ [--cflags]
+Libraries:
+ gtk
+ gthread
+EOF
+ exit $1
+}
if test $# -eq 0; then
- echo "${usage}" 1>&2
- exit 1
+ usage 1 1>&2
fi
+lib_gtk=yes
+
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
fi
;;
--prefix)
- echo $prefix
+ echo_prefix=yes
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
- echo $exec_prefix
+ echo_exec_prefix=yes
;;
--version)
echo @GTK_VERSION@
;;
--cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ gtk)
+ lib_gtk=yes
+ ;;
+ gthread)
+ lib_gthread=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+if test "$echo_prefix" = "yes"; then
+ echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+ echo $exec_prefix
+fi
+
+if test "$lib_gthread" = "yes"; then
+ glib_cflags="$glib_thread_cflags"
+ glib_libs="$glib_thread_libs"
+fi
+
+if test "$echo_cflags" = "yes"; then
if test @includedir@ != /usr/include ; then
includes=-I@includedir@
for i in $glib_cflags ; do
done
fi
echo $includes @x_cflags@ $glib_cflags
- ;;
- --libs)
+fi
+
+if test "$echo_libs" = "yes"; then
my_glib_libs=
libdirs=-L@libdir@
for i in $glib_libs ; do
fi
fi
done
+
echo $libdirs @x_ldflags@ -lgtk -lgdk $my_glib_libs @INTLLIBS@ @x_libs@ @GDK_WLIBS@ -lm
- ;;
- *)
- echo "${usage}" 1>&2
- exit 1
- ;;
- esac
- shift
-done
+fi
# Configure paths for GTK+
# Owen Taylor 97-11-3
-dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
dnl
AC_DEFUN(AM_PATH_GTK,
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
, enable_gtktest=yes)
+ for module in . $4
+ do
+ case "$module" in
+ gthread)
+ glib_config_args="$glib_config_args gthread"
+ ;;
+ esac
+ done
+
if test x$gtk_config_exec_prefix != x ; then
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
if test x${GTK_CONFIG+set} != xset ; then